extends Button

var link={"line":"1-2","index":0}
var game_scene

func _ready() -> void:
	game_scene=get_tree().get_first_node_in_group("game_scene")

func _on_pressed() -> void:
	if global.flag_list["level4_pass"]:
		if global.flag_list["level5_enter"]:
			link={"line":"*-2","index":0}
		else:
			link={"line":"5-2","index":0}
	elif global.flag_list["level3_pass"]:
		if global.flag_list["level4_enter"]:
			link={"line":"*-2","index":0}
		else:
			link={"line":"4-2","index":0}
	elif global.flag_list["level2_pass"]:
		if global.flag_list["level3_enter"]:
			link={"line":"*-2","index":0}
		else:
			link={"line":"3-2","index":0}
	global.cur_line=link["line"]
	global.cur_index=link["index"]
	game_scene._chat_in()
